using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Sampling
{
    /// <summary>
    /// <para>Generate Rectangles Along Lines</para>
    /// <para>Creates a series of rectangular polygons that follow a single linear feature or a group of linear features.</para>
    /// <para>创建一系列服从单个线性要素或一组线性要素的矩形面。</para>
    /// </summary>    
    [DisplayName("Generate Rectangles Along Lines")]
    public class GenerateRectanglesAlongLines : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateRectanglesAlongLines()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Line Features</para>
        /// <para>The input polyline features defining the path of the features.</para>
        /// <para>用于定义要素路径的输入折线要素。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class.</para>
        /// <para>输出面要素类。</para>
        /// </param>
        public GenerateRectanglesAlongLines(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Generate Rectangles Along Lines";

        public override string CallName => "management.GenerateRectanglesAlongLines";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _length_along_line, _length_perpendicular_to_line, _spatial_sort_method.GetGPValue()];

        /// <summary>
        /// <para>Input Line Features</para>
        /// <para>The input polyline features defining the path of the features.</para>
        /// <para>用于定义要素路径的输入折线要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Line Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class.</para>
        /// <para>输出面要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Length Along the Line</para>
        /// <para>The length of the output polygon features along the input line features. The default value is determined by the spatial reference of the input line features. This value will be 1/100 of the input feature class extent along the x-axis.</para>
        /// <para>沿输入线要素的输出面要素的长度。默认值由输入线要素的空间参考确定。此值将是沿 x 轴的输入要素类范围的 1/100。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Length Along the Line")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _length_along_line { get; set; } = "2 DecimalDegrees";


        /// <summary>
        /// <para>Length Perpendicular to the Line</para>
        /// <para>The length of the output polygon features perpendicular to the input line features. The default value is determined by the spatial reference of the input line features. This value will be one-half the number used for the length along the line.</para>
        /// <para>垂直于输入线要素的输出面要素的长度。默认值由输入线要素的空间参考确定。此值将是用于沿线长度的数字的一半。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Length Perpendicular to the Line")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _length_perpendicular_to_line { get; set; } = "1 DecimalDegrees";


        /// <summary>
        /// <para>Spatial Sort Method</para>
        /// <para><xdoc>
        ///   <para>Output features are created in a sequential order and require a spatial starting point. Setting the direction type to upper right will start the output features in the upper right of each input feature.</para>
        ///   <bulletList>
        ///     <bullet_item>Upper right—Features start in the upper right corner. This is the default.</bullet_item><para/>
        ///     <bullet_item>Upper left—Features start in the upper left corner.</bullet_item><para/>
        ///     <bullet_item>Lower right—Features starts in the lower right corner.</bullet_item><para/>
        ///     <bullet_item>Lower left—Features starts in the lower left corner.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出要素按顺序创建，需要空间起点。将方向类型设置为右上角将启动每个输入要素右上角的输出要素。</para>
        ///   <bulletList>
        ///     <bullet_item>右上角 - 要素从右上角开始。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>左上角 - 要素从左上角开始。</bullet_item><para/>
        ///     <bullet_item>右下角 - 要素从右下角开始。</bullet_item><para/>
        ///     <bullet_item>左下角 - 要素从左下角开始。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Spatial Sort Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _spatial_sort_method_value _spatial_sort_method { get; set; } = _spatial_sort_method_value._UL;

        public enum _spatial_sort_method_value
        {
            /// <summary>
            /// <para>Upper left</para>
            /// <para>Upper left—Features start in the upper left corner.</para>
            /// <para>左上角 - 要素从左上角开始。</para>
            /// </summary>
            [Description("Upper left")]
            [GPEnumValue("UL")]
            _UL,

            /// <summary>
            /// <para>Upper right</para>
            /// <para>Upper right—Features start in the upper right corner. This is the default.</para>
            /// <para>右上角 - 要素从右上角开始。这是默认设置。</para>
            /// </summary>
            [Description("Upper right")]
            [GPEnumValue("UR")]
            _UR,

            /// <summary>
            /// <para>Lower left</para>
            /// <para>Lower left—Features starts in the lower left corner.</para>
            /// <para>左下角 - 要素从左下角开始。</para>
            /// </summary>
            [Description("Lower left")]
            [GPEnumValue("LL")]
            _LL,

            /// <summary>
            /// <para>Lower right</para>
            /// <para>Lower right—Features starts in the lower right corner.</para>
            /// <para>右下角 - 要素从右下角开始。</para>
            /// </summary>
            [Description("Lower right")]
            [GPEnumValue("LR")]
            _LR,

        }

        public GenerateRectanglesAlongLines SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}